package com.aeoj.clientmanagement.proxy;

import com.aeoj.clientmanagement.service.CodeSandBoxService;
import com.aeoj.clientmanagement.domain.codesandbox.CodeSandBoxRequest;
import com.aeoj.clientmanagement.domain.codesandbox.CodeSandBoxResponse;
import lombok.extern.slf4j.Slf4j;

/**
 * 代码沙箱代理类
 * author: ZSM
 * time: 2025-03-01 19:34
 */
@Slf4j
public class CodeSandBoxProxy implements CodeSandBoxService {
    private final CodeSandBoxService codeSandBoxService;

    public CodeSandBoxProxy(CodeSandBoxService codeSandBoxService) {
        this.codeSandBoxService = codeSandBoxService;
    }

    @Override
    public CodeSandBoxResponse execute(CodeSandBoxRequest codeSandBoxRequest) {
        log.info("代码沙箱代理记录日志，请求的参数:{}", codeSandBoxRequest);
        CodeSandBoxResponse response = codeSandBoxService.execute(codeSandBoxRequest);
        log.info("代码沙箱代理记录日志，响应的结果:{}", response);
        return response;
    }
}
